#pragma once
#include <vector>
#include "LevelElement.h"
#include "PhysX.h"
#include "float3.h"
#include "vertex.h"
#include "D3DApp.h"

class NxActor;
class DX10ObjMesh;
class Character;
/**
* Represents a mesh and its physics mesh
* @author Brecht Kets
*/
class Monster: public LevelElement
{
public:

	Monster(Level* level, tstring filename, tstring physicsFileName,float3 loc, float3 rot, PhysX *pPhysX, D3DApp* app, Character* pPlayer);
	virtual ~Monster(void);

	virtual void Initialize(ContentManager *pContentManager);
	virtual void Tick(const InputState & refInputState);
	virtual void Draw(const RenderContext* pRenderContext);
	virtual void Draw(const RenderContext* pRenderContext, ID3D10ShaderResourceView* shadowdepthmap = 0);
	virtual void Translate(const D3DXVECTOR3 pos);
	virtual void Rotate(const D3DXVECTOR3 rot);

protected:
	virtual void SetPhysXGlobalPose();
	virtual void SetPhysXGlobalPose(const D3DXMATRIX& World);

	void LoadAnimation(void);
	virtual bool BuildPhysicsMesh(); 
	virtual void BuildDrawMesh();
	
	NxActor *m_pActor;
	DX10ObjMesh* m_pDrawMesh;
	
	D3DApp* m_app;
	Level* m_pLevel;

	tstring m_filename,m_physicsFileName;
	Character* m_pPlayer;
	PhysX *m_pPhysX;
	float3 m_Pos;
	float3 m_Rot;

private:
	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	Monster(const Monster& m);
	Monster& operator=(const Monster& m);
};

